<!DOCTYPE html>
<html>
<head>
    <title>维护页面</title>
    <script type="text/javascript">
        function popAddOrModify(id) {
            var data = {};
            var url = '${absoluteContextPath}/cw/cwChtb';
            if (id != undefined) {
                data.id = id;
                url = url + "/goEdit";
            } else {
                url = url + "/goAdd";
            }
            $.ajax({
                url:url,
                type:'post',
                data:data,
                success:function(data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        var pop_div = $('#myModal');
                        pop_div.html(data.content.data);
                        pop_div.modal('show');
                    } else {
                        $.showMessage({parentId:"showMessage",message:"数据加载异常！",type:"success"});
                    }
                }
            });
        }

        function deleteCwChtb() {
            var i = 0;
            $("input[name=ids]").each(function () {
                if ($(this).prop("checked")) {
                    i++;
                }
            });
            if(i == 0) {
                $.showMessage({parentId:"showMessage",message:"请选择您要删除的记录！",type:"success"});
                return false;
            } else {
                $.confirm({
                    confirm:function() {
                        var values = "";
                        $("input[name=ids]").each(function () {
                            if ($(this).prop("checked")) {
                                values += $(this).val() + ",";
                            }
                        });
                        $("#confirmModal").modal("hide");
                            $.post("${absoluteContextPath}/cw/cwChtb/delete", {
                            'ids' : values
                        }, function(data) {
                            data = JSON.parse(data);
                            if (data.returnCode == 1) {
                                    $.showMessage({parentId:"showMessage",message:"数据删除成功！",type:"success"});
                                refreshTable();
                            } else {
                                    $.showMessage({parentId:"showMessage",message:"数据删除异常！",type:"error"});
                            }
                        });
                    }
                });
            }
        }

         function refreshTable() {
            $("input[name=currentPage]").val(1);
            $("#search_cwChtb_table").ajaxSubmit({
                url:'${absoluteContextPath}/cw/cwChtb/ajaxList',
                success:function(data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent").html(data.content.data);
                    } else {
                        $.showMessage({parentId:"showMessage",message:"表格数据加载异常！",type:"success"});
                    }
                }
            });
        }
        function popExportExcel() {
            $("#search_cwChtb_table").attr('action', '${absoluteContextPath}/cw/cwChtb/export');
            $("#search_cwChtb_table").submit();
            $("#search_cwChtb_table").attr('action', '${absoluteContextPath}/cw/cwChtb/list');
        }
    </script>
</head>
<body>

<div class="breadcrumbs">
    <ol class="breadcrumb">
        <li><a href="${absoluteContextPath}/home"><i class="fa fa-home"></i>首页</a></li>
        <li><a href="#">效果评估</a></li>
        <li class="active">促会同比</li>
    </ol>
</div>

<div class="main">
    <!-- row -->
    <div class="row">
        <div class="col-md-12">
           <#--<section class="tile">
                 <div class="tile-body">
                    <div id="showMessage"><#include "../../message.ftl" /></div>
                    <div class="form-horizontal">-->
                        <form id="search_cwChtb_table" action="${absoluteContextPath}/cw/cwChtb/list" method="post">
                       <#--     <input type="hidden" name="pageSize" value="${cwChtbsTable.page.pageSize}"/>
                            <input type="hidden" name="currentPage" value="${cwChtbsTable.page.currentPage}"/>


                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2"></label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="id" value="${cwChtbParams.id!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">年度</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="nian" value="${cwChtbParams.nian!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">项目</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="projects" value="${cwChtbParams.projects!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK1</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak1" value="${cwChtbParams.ak1!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK2</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak2" value="${cwChtbParams.ak2!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK3</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak3" value="${cwChtbParams.ak3!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK4</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak4" value="${cwChtbParams.ak4!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK5</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak5" value="${cwChtbParams.ak5!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK6</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak6" value="${cwChtbParams.ak6!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK7</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak7" value="${cwChtbParams.ak7!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK8</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak8" value="${cwChtbParams.ak8!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK9</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak9" value="${cwChtbParams.ak9!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK10</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak10" value="${cwChtbParams.ak10!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK11</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak11" value="${cwChtbParams.ak11!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK12</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak12" value="${cwChtbParams.ak12!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">AK13</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="ak13" value="${cwChtbParams.ak13!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2"></label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="spareA" value="${cwChtbParams.spareA!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2"></label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="spareB" value="${cwChtbParams.spareB!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2"></label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="spareC" value="${cwChtbParams.spareC!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2"></label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="spareD" value="${cwChtbParams.spareD!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2"></label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="spareE" value="${cwChtbParams.spareE!''}" placeholder="" type="text">
                                    </div>
                                </div>
                            </div>
                                <div class="row">
                                    <div class="form-group col-md-4">
                                        <label class="col-sm-4"></label>
                                        <div class="col-sm-8">
                                            <button type="button" class="btn btn-primary" onclick="refreshTable()">查询</button>
                                            <button type="reset" class="btn btn-default">重置</button>
                                        </div>
                                    </div>
                                </div>-->
                            </form>
             <#--       </div>
                </div>
            </section>-->
            <section class="tile">
                <div class="tile-header">
                    <h1>
                        <button type="button" class="btn btn-green" onclick="popExportExcel();"><i
                                class="fa fa-plus"></i><span class="margin-left-5">导出</span></button>
                    </h1>
                </div>
                <div class="tile-body nopadding">
                    <div class="table-responsive" id="tableContent">
                        <#include "table.ftl"/>
                    </div>
                </div>
            </section>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    </div>
</div>
</body>
</html>
